﻿@model viBook.Models.ResetPasswordModel

@{
    ViewBag.Title = "Reset password";
    var id = Request.QueryString["userid"];
    var code = Request.QueryString["code"];
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="session-form">
    <h1 class="col-60 section_title">
                Hello <span class="meta">@ViewBag.DisplayName</span>!</h1> 
    <h2 class="section">Please use the form below to create new password.</h2>
    @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "gen-form with-messages" }))
    {
        @Html.ValidationSummary(true)
        <input type="hidden" id="userId" name="userId" value="@id"/>
        <input type="hidden" id="validateCode" name="validateCode" value="@code"/>
        <div class="form-field">
            <fieldset>
                @Html.LabelFor(model => model.NewPassword)
                @Html.PasswordFor(model => model.NewPassword, new { @class = "form-text" })
            </fieldset>
            <p class="message">
                @Html.ValidationMessageFor(model => model.NewPassword)
            </p>
        </div>

        <div class="form-field">
            <fieldset>
                @Html.LabelFor(model => model.ConfirmPassword)
                @Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-text" })
            </fieldset>
            <p class="message">
                @Html.ValidationMessageFor(model => model.ConfirmPassword)
            </p>
        </div>

        <div class="form-btns">
            <input type="submit" value="Change password" class="form-sub" />
        </div>
    }   
</div>
